package com.sz.mes.entity;

import java.util.Date;
import java.lang.Double;
import java.math.BigDecimal;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.validator.constraints.Length;
import java.util.List;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.sz.mes.entity.BaseCustomEntity;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;
import com.diboot.core.util.D;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 供应商类型 Entity定义
 * @author hem
 * @version 1.0
 * @date 2023-04-04
 * Copyright © szhs
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("supplier_type")
public class SupplierType extends BaseCustomEntity {

    private static final long serialVersionUID = -6773563688150038774L;

    /**
     * 上级id
     */
    @NotNull(message = "上级id不能为空")
    @TableField()
    private Long parentId;

    /**
     * 名称
     */
    @NotNull(message = "名称不能为空")
    @Length(max = 100, message = "名称长度应小于100")
    @TableField()
    private String supplierTypeName;

    /**
     * 供应商编码
     */
    @NotNull(message = "供应商编码不能为空")
    @Length(max = 100, message = "供应商编码长度应小于100")
    @TableField()
    private String supplierTypeCode;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createBy;

    /**
     * 更新人
     */
    @TableField(fill = FieldFill.UPDATE)
    private Long updateBy;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;
}
